package com.pro.xwt.common.service.impl;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pro.xwt.common.mapper.BTaskMapper;
import com.pro.xwt.common.model.BTask;
import com.pro.xwt.common.service.BTaskService;
import com.pro.xwt.common.utils.Common;
import com.pro.xwt.common.vo.BEmployeeVO;
import com.pro.xwt.common.vo.BProjectVO;

@Service("bTaskService")
public class BTaskServiceImpl extends AbstractService<BTask, String> implements BTaskService {
	@Autowired
	BTaskMapper bTaskMapper;
	@Override
	public List<BTask> selectTaskByEmployee(String empId) {
		return bTaskMapper.selectTaskByEmployee(empId);
	}

	@Override
	public int updateComState(String id, BTask btask) {
		return bTaskMapper.update(btask);
	}
	
	public int insert(BTask t){
		return bTaskMapper.insert(t);
	}
	
	@Override
	public List<BTask> selectTasks(String execEmpId) {
		// TODO Auto-generated method stub
		return bTaskMapper.selectTasks(execEmpId);
	}

	@Override
	public int activeEmployee() {
		// TODO Auto-generated method stub
		return bTaskMapper.activeEmployee();
	}

	@Override
	public List<BProjectVO> selectTaskCountAndProj(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return bTaskMapper.selectTaskCountAndProj(map);
	}

	@Override
	public List<BEmployeeVO> selectEmpTasks(Map<String, Object> parameter) {
		// TODO Auto-generated method stub
		return bTaskMapper.selectEmpTasks(parameter);
	}

	@Override
	public Map<String, Object> differentStateTaskSum() {
		// TODO Auto-generated method stub
		return bTaskMapper.differentStateTaskSum();
	}

}
